package tour.spring.bc.bo.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tour.spring.bc.assembler.PlaceAssembler;
import tour.spring.bc.assembler.RegionAssembler;
import tour.spring.bc.dao.PlaceDao;
import tour.spring.bc.dao.RegionDao;
import tour.spring.bc.dto.PlaceDto;
import tour.spring.bc.dto.RegionDto;

@Service
public class PlaceBoImpl{
	@Autowired
	private PlaceDao placeDao;
	
	@Autowired
	private RegionDao regionDao;
	
	@Autowired
	private PlaceAssembler placeAssembler;

	@Autowired
	private RegionAssembler regionAssembler;
	
	public Collection<PlaceDto> queryAllPlaces(){
		return placeAssembler.convertToDto(placeDao.loadAll());
	}
	
	public Collection<RegionDto> queryAllRegions(){
		return regionAssembler.convertToDto(regionDao.loadAll());
	}
}
